<nav id="h" class="blog-nav layui-header">
    <div class="blog-container">

        {#        {% if current_user %}#}
        {#            <a href="#" class="blog-user">#}
        {#                <i class="fa fa-registered" style="color: #ffffff">{{ current_user.nick_name }}</i>#}
        {#            </a>#}
        {#        {% else %}#}
        {#            <a href="/login" class="blog-user">#}
        {#                <i class="fa fa-registered" style="color: #ffffff">登录/注册</i>#}
        {#            </a>#}
        {#        {% endif %}#}

        {% if not current_user %}
            <a href="/login" class="blog-user">
                <i class="fa fa-registered" style="color: #ffffff">登录/注册</i>
            </a>
        {% else %}
            {#            <a href="/" class="blog-user">#}
            {#                <i class="fa fa-registered" style="color: #ffffff">{{ current_user.nick_name }}</i>#}
            {#            </a>#}
            {#            <a href="{{ current_user.avatar_url }}" class="blog-user">#}
            {#                <img src="{{ current_user.avatar_url }}" class="layui-nav-img blog-user" alt="???">#}
            {#            </a>#}
            {#            <a href="/my/{{ current_user.id }}"#}
            {#               class="login_btn layui-font-18 blog-user"><i class="fa fa-registered" style="color: #ffffff">{{ current_user.nick_name }}</i></a>|#}
            {#            <a href="javascript:;" class="logout_btn layui-font-18 blog-user"><i class="fa fa-registered" style="color: #ffffff">退出</i></a>#}
            {#            <a href="/admin/login" class="register_btn blog-user"><i class="fa fa-registered" style="color: #ffffff">admin</i></a>#}
            <ul class="layui-layout-right blog-user">
                <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
                    <a href="/my/{{ current_user.id }}">
{#                        <img src="{{ current_user.avatar_url }}" class="layui-nav-img"#}
{#                             style="width: 30px;height: 30px;" alt="...">#}
                        <i class="fa fa-registered" style="color: #ffffff">{{ current_user.nick_name }}</i>
                    </a>
                </li>
                <li class="layui-nav-item layui-hide layui-show-sm-inline-block">

                    <button class="layui-btn-danger"><a href="/logout">logout</a></button>

                </li>
                {% if current_user.is_admin %}
                    <li class="layui-nav-item layui-hide layui-show-sm-inline-block">
                    <a href="/admin/login">
                        <button class="layui-btn-fluid">admin</button>
                    </a>
                </li>
                {% endif %}
            </ul>
        {% endif %}

        <a class="blog-logo" href="/">HP News</a>
        <ul class="layui-nav" lay-filter="nav">
            <li class="layui-nav-item">
                <a href="/"><i class="fa fa-home fa-fw"></i>&nbsp;网站首页</a>
            </li>
            <li class="layui-nav-item">
                <a href="/article"><i class="fa fa-file-text fa-fw"></i>&nbsp;文章专栏</a>
            </li>
{#            <li class="layui-nav-item">#}
{#                <a href="/mixed_pic"><i class="fa fa-paper-plane-o fa-fw"></i>&nbsp;杂七杂八</a>#}
{#            </li>#}
            <li class="layui-nav-item">
                <a href="/timeline"><i class="fa fa-hourglass-half fa-fw"></i>&nbsp;点点滴滴</a>
            </li>
            <li class="layui-nav-item">
                <a href="/about"><i class="fa fa-info fa-fw"></i>&nbsp;关于本站</a>
            </li>
            <span class="layui-nav-bar"></span></ul>

        <a class="blog-navicon" href="javascript:;">
            <i class="fa fa-navicon"></i>
        </a>
    </div>
</nav>